package com.love.marriage.userCommissionBalance.mapper;

import com.love.marriage.userCommissionBalance.entity.UserCommissionBalance;
import com.love.marriage.userCommissionBalance.vo.UserCommissionBalanceVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import com.love.marriage.common.interfaces.permission.DataPermission;

/**
 * description:  用户回佣余额表 mapper
 * author:       mybatisPlus
 * createDate:   2024-11-10 18:51:27
 * version:      1.0.0
 */
@Mapper
public interface UserCommissionBalanceMapper extends BaseMapper<UserCommissionBalance> {

    @DataPermission(table = "user_commission_balance_t")
    Page<UserCommissionBalanceVo> getPage(Page<UserCommissionBalanceVo> page, @Param("userCommissionBalanceVo") UserCommissionBalanceVo userCommissionBalanceVo);

    UserCommissionBalanceVo queryUserCommissionBalance(@Param("id") Long id);

    UserCommissionBalanceVo queryByUserId(@Param("userId") Long userId);

    UserCommissionBalanceVo queryTotalCommissionByUserId(@Param("userId") Long userId);
}
